<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
	$(function(){
		$('#user_reg_regForm input').bind('keyup',function(event){//可查jquery手册，增加回车功能
			if(event.keyCode=='13'){
				$('#user_reg_regForm').submint();
			}
		});
	});
</script>
<div id="user_reg_regDialog" class="easyui-dialog" style="width:310px;height:180px"
	 data-options="title:'注册',modal:true,closed:true,buttons:[{
			text:'提交',
			iconCls:'icon-edit',
			handler:function(){
				$('#user_reg_regForm').form('submit',{
					url:'${pageContext.request.contextPath}/userAction!reg.action',
					success:function(r){
						var obj= jQuery.parseJSON(r);
						if(obj.success){
							$('#user_reg_regDialog').dialog('close');
							$.messager.show({
								title:'提示',
								msg:obj.msg
							});
						}else{
							$.messager.show({
								title:'提示',
								msg:obj.msg
							});
						}
					}
				});
			}
			}]">
			<form id="user_reg_regForm" method="post">
			<table>
				<tr>
					<th align="right">登录名:</th>
					<th><input class="easyui-validatebox" name="name" data-options="required:true,missingMessage:'请输入用户名！'"/></th>
				</tr>
				<tr>
					<th align="right">密码:</th>
					<th><input type="password" name="password" class="easyui-validatebox" data-options="required:true"/></th>
				</tr>
				<tr>
					<th align="right">重复密码:</th>
					<th><input type="password" name="repwd" class="easyui-validatebox" data-options="required:true,validType:'eqPwd[\'#user_reg_regForm input[name=password]\']'"/></th>
				</tr>
				<tr>
					<th align="right">性别：</th>
					<th>
						<input type="radio" name="gender" value="女" checked="checked"><span>女</span>
						<input type="radio" name="gender" value="男"><span>男</span>
					</th>
				</tr>
			</table>
			</form>
</div>